package com.overlord.im.client.message.resolver;

import com.overlord.im.commons.message.OverlordImMessage;
import io.netty.channel.ChannelHandlerContext;

/**
 * @author wuwei
 * @className MessageResolver
 * @description
 * @date 2020/6/10 10:45
 **/
public interface MessageResolver {

    /**
     * 是否支持该类型消息
     *
     * @param message
     * @return
     */
    boolean support(OverlordImMessage message);

    /**
     * 对消息的处理
     *
     * @param message
     * @param ctx
     * @return
     */
    void resolve(OverlordImMessage message, ChannelHandlerContext ctx);
}
